package model.symbol;

/**
 * This class is specific to assembly language registers.
 * Since registers are not case sensitive, as a general rule the name should be all lowercase to allow finding by hashing
 *
 * @author Neil Dickson
 */
public class Register extends Keyword {
	private	final int	type;
	private final int	number;

	/**
	 * The register number above or equal to which the mode must be 64-bit and the encoding may require a REX prefix.
	 */
	public static final int THRESHOLD_64_BIT = 8;
	/**
	 * This is the register number for registers that have no associated number (i.e. RIP).
	 * These only appear in 64-bit mode.
	 */
	public static final int NO_NUMBER = -1;

	public Register(String register, String description,int type,int number) {
		super(register, description);
		this.type = type;
		this.number = number;
	}

	public int getType() {
		return type;
	}

	public int getNumber() {
		return number;
	}
}
